<?php include_once(INC.'admin/php/clases/Texto.php'); ?>
<nav class="top-bar">
    <ul class="title-area">
        <!-- Title Area -->
        <li class="name">
            <h1><a href="<?php echo(URL); ?>"><img src="<?php echo(URL); ?>content/img/marcos-furer.jpg" alt="" /></a></h1>
        </li>
        <!-- Remove the class "menu-icon" to get rid of menu icon. Take out "Menu" to just have icon alone -->
        <li class="toggle-topbar menu-icon"><a href="#"><span></span></a></li>
    </ul>

    <section class="top-bar-section">
        <!-- Right Nav Section -->
        <ul class="right">
            <li><a href="<?php echo(URL); ?>">Home</a></li>
            <li class="has-dropdown"><a href="<?php echo(URL); ?>photography">Photography</a>
                <?php
                    $html = '<ul class="dropdown">';
                    $photographies = Doctrine::getTable('photography')->findAll();
                    foreach ($photographies as $photography) {
                        $html .= '<li class="has-dropdown"><a href="'.URL.'photography/'.$photography->uri.'">'.htmlentities($photography->titulo).'</a><ul class="dropdown">';
                        foreach ($photography->galleries as $gallery) {
                            $html .= '<li><a href="'.URL.'photography/'.$photography->uri.'/'.$gallery->uri.'">'.  Texto::cortar(htmlentities($gallery->titulo), 23, '...').'</a></li>';
                        }
                        $html .= '</ul>';
                    }
                    $html .= '</ul>';
                    echo($html);
                ?>
            </li>
            <li><a href="<?php echo(URL); ?>fine-art-prints">Fine Art Prints</a>
            <li><a href="<?php echo(URL); ?>about">About</a>
            <li><a href="<?php echo(URL); ?>contact">Contact</a>
        </ul>
    </section>
</nav>